//
//  SCWorkoutDataBlock.h
//  FirstSCAnalyzer
//
//  Created by Roelant Ossewaarde on 8/28/09.
//  Copyright 2009 SUNY Buffalo. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Chunk.h>

enum IntervalType {
	DistanceIntervalType,
	TimeIntervalType,
	StrokeIntervalType,
	UnknownIntervalType
};

enum UnitType {
	MSecUnitType,
	MphUnitType,
	KtsUnitType
};

enum MemType {
	AutomemType,
	WorkoutmemType,
	UnknownmemType
};

enum CSVColumn {
	CSVColumnMemtype = 0x1,
	CSVColumnRelativeSequenceNo = 0x2,
	CSVColumnSequenceNo = 0x4,
	CSVColumnDate = 0x8,
	CSVColumnDistance = 0x10,
	CSVColumnCumulativeDistance = 0x20,
	CSVColumnDuration = 0x40,
	CSVColumnNumberOfStrokes = 0x80,
	CSVColumnAverageStrokeRate = 0x100,
	CSVColumnHeartRate = 0x200,
	CSVColumnSplittimeInSeconds = 0x200,
	CSVColumnSplittimeInString = 0x400,
	CSVColumnDistancePerStroke = 0x800,
	CSVColumnAll = 0xFFFF
};

typedef enum IntervalType IntervalType;
typedef enum UnitType UnitType;
typedef enum MemType MemType;
typedef enum CSVColumn CSVColumnType;

@interface SCWorkoutDataBlock : NSObject {
	int time;
	int distance;
	int cumulativeDistance;
	int averageStrokeRate;
	int numberOfStrokes;
	int heartRate;
	NSDate *date;
	IntervalType intervalType;
	UnitType unitType;
	NSString *label;
	int sequenceno;
	int relativeSequenceno;
	MemType memType;
}

@property (assign) int time;
@property (assign) int distance;
@property (assign) int cumulativeDistance;
@property (assign) int averageStrokeRate;
@property (assign) int numberOfStrokes;
@property (assign) int heartRate;
@property (assign) IntervalType intervalType;
@property (assign) UnitType unitType;
@property (retain) NSDate *date;
@property (retain) NSString *label;
@property (assign) int sequenceno;
@property (assign) int relativeSequenceno;
@property (assign) MemType memType;

-(id) init;
-(id) initWithLabel:(NSString *)label;
-(void) logDump;
-(NSString *) csvHeader;
-(NSString *) toCSV;
-(void) setWorkoutData:(Chunk *)chunk ;
@end
